<script setup lang="ts">
import { ref } from 'vue'
import type { InputInstance } from '@hc/components'

const state = ref('')
const inputRef = ref<InputInstance>()

const onFocus = () => {
  inputRef.value?.focus()
}
</script>

<template>
  <div>
    <hc-input v-model="state" ref="inputRef" />
    <div>{{ state }}</div>
    <button @click="onFocus">focus</button>
  </div>
</template>

